#ifndef COMBAT_H
#define COMBAT_H
#include <QWidget>
#include"maze.h"
#include<QPainter>
#include<QImage>
#include <QKeyEvent>
#include<QPixmap>
#include <QTimer>
namespace Ui {
class Combat;
}

class Combat : public QWidget
{
    Q_OBJECT

public:
    explicit Combat(QWidget *parent = 0);
    ~Combat();
    bool simple,normal,hard;
    bool pvp,pve;
    void keyPressEvent(QKeyEvent *e);
    void paintEvent(QPaintEvent *);
    void pvePerson2();
    void pveSleep(int msec);
    void setStPEdP(Node s,Node e){
        this->stP=s;
        this->edP=e;
    }
signals:
    void ret();

private slots:
    void on_ret_clicked();

    void on_start_clicked();

    void on_simple_clicked();

    void on_normal_clicked();

    void on_hard_clicked();

    void on_pvp_clicked();

    void on_pve_clicked();

private:
    Ui::Combat *ui;
    Maze maze;
    bool isOk;
    int n,wid;
    int result;
    Node person1,person2;
    bool isPosition;
    QList<Node> route;
    bool pve_b;
    int cnt;
    int msec;
    Node stP;
    Node edP;
};

#endif // COMBAT_H
